<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
  <head>
    <!--加载header文件-->
    <?php
    include_once 'public/views/header.php';
    ?>
    <link rel="stylesheet" href="public/css/list.css" />
    <link rel="stylesheet" href="public/xr/xrDatatable.css" />
    <script src="public/xr/xrDatatable.js"></script>
    <script src="public/js/list.js"></script>
    <script src="cust/js/classList.js"></script>
  </head>
  <body>
    <input type="hidden" id="zjipc_auth_url" value="<?php echo ZJIPC_AUTH_URL ?>">
    <input type="hidden" id="zjipc_app_id" value="<?php echo ZJIPC_APP_ID ?>">
    <div class="page-container container">
      <div class="searchForm">
          <div class="searchForm-title"><i class="icon-table searchForm-title-icon"></i>数据表格<i class="icon-double-angle-up searchFormTitleIcon"></i></div>
          <div class="searchForm-main">
          <form id="searchForm">
            <select name="academic_year" id="academic_year">
              <?php foreach ($academic_year as $k => $v): ?>
                <option value="<?=$v['academic_year']?>" <?php if($v['academic_year']==$default_academic_year)echo "selected" ?>><?=$v['academic_year']?></option>
              <?php endforeach ?>
            </select>
            <select name="term" id="term">
              <option value="-1">请选择学期</option>
               <option value="1">第一学期</option>
               <option value="2">第二学期</option>
            </select>
              <input type="text" name='code' id="code" placeholder="课程编号"/>
             <input type="text" name='name' id="name" placeholder="课程名称"/>             
             <input type="text" name='week' id="week" placeholder="周数"/>
             <select name="weekday" id="weekday">
                <option value="-1">星期</option>
               <option value="一">周一</option>
               <option value="二">周二</option>
               <option value="三">周三</option>
               <option value="四">周四</option>
               <option value="五">周五</option>
             </select>
             <select name="section" id="section">
                <option value="-1">节数</option>
               <?php for ($i=1; $i <=8 ; $i++): ?>
                <option value="<?=$i?>">第<?=$i?>节</option>
               <?php endfor ?>
             </select>             
             <br>
             <br>
             <input type="text" name='professional_direction' id="professional_direction" placeholder="专业方向"/>
             <input type="text" name='teacher_name' id="teacher_name" placeholder="授课教师"/>
             <input type="text" name='classroom' id="classroom" placeholder="上课教室"/>
             <input type="text" name='classname' id="classname" placeholder="上课班级"/>
             <select name="course_units" id="course_units">
               <option value="-1">请选择开课单位</option>
               <?php foreach ($course_units as $k => $v):?>
                <option value="<?=$v['course_units']?>"><?=$v['course_units']?></option>
               <?php endforeach ?>
             </select>
          </form>
        </div>
      </div>
     
      <div class="listcontent">
        <div class='xrTableRow'>
          <table id="table" class="xrTable">
            <thead>
              <tr>
                <th name="_xrno"></th>
                <th name="_oper" style="width: 120px;">操作</th>
                <th name="_code" > 课程编号 </th>
                <th name="_name" > 课程名称 </th>
                <th name="_term_char" > 学期 </th>
                <!-- <th name="_roleName" > 选修课程编号 </th> -->
                <th name="_teaching_plan_no" > 教学计划编号 </th>
                <th name="_professional_direction" > 专业方向 </th>
                <th name="_start_time" > 开始周</th>
                <th name="_end_time" > 结束周</th>
                <th name="_teacher_name" > 授课教师</th>
                <th name="_course_units" > 开课单位</th>
                <!-- <th name="_classroom" > 上课教室</th> -->
                <th name="_classname" > 上课班级</th>
              </tr>
            </thead>
          </table>
        </div>
      </div>
    </div>
  </body>
  <script>
    $("body").keydown(function() {
             if (event.keyCode == "13") {//keyCode=13是回车键
                 $('.searchButton').click();
             }
         });
    $("#role").change(function(){
      $('.searchButton').click();
    });
    $("#academic_year").change(function(){
      $('.searchButton').click();
    });
    $("#course_units").change(function(){
      $('.searchButton').click();
    });
    $("#weekday").change(function(){
      $('.searchButton').click();
    });
    $("#section").change(function(){
      $('.searchButton').click();
    });
    $("#term").change(function(){
      $('.searchButton').click();
    });
  </script>
</html>